<template>
	<div id="app">
		<router-view></router-view>
		<div class="page-component-up" v-show="is_scroll" @click="Top">
	  		<i class="el-icon-caret-top"></i>
	  	</div>
		<div class="main-footer">
			<ul class="main-footer-link">
				<li>吉贡成员企业</li>
				<li>
					<el-tooltip placement="top">
					  	<div slot="content">商务联系：13524962024</div>
					  	<a href="http://www.jigon.cn/index.php?m=content&c=index&a=lists&catid=20">联系我们</a>
					</el-tooltip>				
				</li>
				<li style="border: 0;"><a href="http://www.jigon.cn/index.php?m=content&c=index&a=lists&catid=15">关于农特</a></li>
			</ul>
			<div class="main-copyright">Copyright@2017-2018农特吉贡（北京）科技有限公司版权所有Corporation All Rights Reserved 京ICP备 18001533号-1</div>
		</div>
	</div>
</template>

<script>
  export default {
    name: 'app',
    data(){
    	return {
    		is_scroll: false
    	}
    },
    mounted(){
    	window.addEventListener('scroll', this.showTop);
    },
    methods: {
    	showTop(){
  		  var scrollTop = document.documentElement.scrollTop;
    		if(scrollTop > 300){
    			this.is_scroll = true;
    		}else{
    			this.is_scroll = false;
    		}
    	},
    	Top(){
    		document.documentElement.scrollTop = 0;
    	}
    }
  }
</script>
